//
//  WCNNewsDetailVC.m
//  WCN
//
//  Created by wsj2015 on 15/11/9.
//  Copyright © 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCNNewsDetailVC.h"
#import "Macros.h"
#import "WCButton.h"
#import "UINavigationItem+Offset.h"
@interface WCNNewsDetailVC ()<UIWebViewDelegate>
{
    UIWebView *_webView;


}
@end

@implementation WCNNewsDetailVC

- (instancetype)init
{
    if (self = [super init]) {
        self.title =@"资讯详情";
    }

    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    
    
    WCButton *leftBtn = [WCButton backButton];
    [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
    [self.navigationItem addLeftBarButtonItem:leftBtn];
    
    
    _webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight -64)];
    _webView.delegate = self;
  
    [self.view addSubview: _webView];
 
    [self loadRequest];
 
   

}
- (void)backAction
{
    [self pageBack];

}
- (void)loadRequest
{
    
    NSURLRequest *request =[NSURLRequest requestWithURL:self.url];
    
    [_webView loadRequest:request];
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
    NSLog(@"%@",error);

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
